// pages/component/index/tannav.js
const app = getApp();
var CONFIG = require("../../../config/config.js");
var share = require("../../../utils/share.js");
Component({
    /**
     * 组件的属性列表
     */
    properties: {
        navdata: {
            type: Object,
            value: '',
        },
    },

    /**
     * 组件的初始数据
     */
    data: {
        imgUrl: CONFIG.API_PIC,
    },
    lifetimes: {
        
    },

    /**
     * 组件的方法列表
     */
    methods: {
        navclick(e){
            var that = this;
            // console.log(e);
            var item = e.currentTarget.dataset.item;
            var typestatus = that.data.navdata.typestatus;
            if (item.name == 'crm' && typestatus!='crm') {
                wx.redirectTo({
                    url: '/pages/staff/mycustom'
                })
            } else if (item.name == 'apply' && typestatus != 'apply') {
                wx.redirectTo({
                    url: '/pages/apply/index'
                })
            } else if (item.name == 'my' && typestatus != 'my') {
                wx.redirectTo({
                    url: '/pages/staff/my'
                })
            }
        }
    }
})
